import request from '@/utils/request.js'

export function getRoles(params) {
  return request.get('/sys/role', { params })
}

export function delRoles(id) {
  return request.delete('/sys/role/' + id)
}

export function addRoles(data) {
  return request.post('/sys/role', data)
}

export function editRoles(data) {
  return request.put('/sys/role/' + data.id, data)
}

export function getRolePermission(id) {
  return request.get('/sys/role/' + id)
}

export function savePermission(data) {
  return request.put('/sys/role/assignPrem', data)
}
